\documentclass[11pt]{article}
\usepackage{geometry}                % See geometry.pdf to learn the layout options. There are lots.
\geometry{letterpaper}                   % ... or a4paper or a5paper or ... 
%\geometry{landscape}                % Activate for rotated page geometry
\usepackage[parfill]{parskip}    % Activate to begin paragraphs with an empty line rather than an indent
\usepackage{graphicx}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{epstopdf}
\usepackage{ulem}
\DeclareGraphicsRule{.tif}{png}{.png}{`convert #1 `dirname #1`/`basename #1 .tif`.png}

%------------- Commands ---------------$

\newcommand{\bt}[1]{{\sc #1}}



 %--------------------------------------------%
\title{title}
\author{Kelsey Cairns - Team Orange}
\date{\today} % delete this line to display the current date

\begin{document}

\begin{centering}
\textbf{\huge{Android dotCal}}\\
\LARGE{Requirements}

\end{centering}

\tableofcontents

\section{Overview}

The dotCal application is designed to run on the Android phone. The purpose of this application is to easily let the user track where they were and when. The user starts an event with a single click. The phone should then automatically find its location. When the user is done with their activity, they can click \bt{Stop} and their location and time spent there will be logged as a calendar entry.

With future versions, the recorded information will be publishable to the web. The intent is to help automate social networking and blogging.

\section{Functional Components}

\subsection{User Interface}

The user interface needs to be simple and intuitive. The user will interact with the following screens:

\begin{itemize}
	\item{Setup Screen: Gathers the user's settings.}
	\item{Start Screen: Allows the user to trigger the start of events.}
	\item{Current Event Screen: Allows the user to stop the current event.}
	\item{Change Category Screen: Allows the user to change the current event's category.}
	\item{Summary Screen: Appears after an event has been stopped.}
	\item{Reminder Notification Screen: Reminds the user that there's a dotCal event running.}
	\item{Cancelation Confirmation Popup Screen: Obtains user confirmation before canceling an event.}
	\item{Screen allowing the user to publish an event to a blog or other web service. This will not be implemented until later versions.}
	\item{Screen allowing the user to add notes, tags, or any written description to the event. This will be done through Android's calendar application instead of dotCal's interface.}
\end{itemize}

\subsection{Setup Screen} 

The Setup Screen is used to examine or change the following settings:
\begin{itemize}
	\item{Remind Me, a checkbox which determines whether to remind the user periodically that an event is running. Only if this option is checked is the Reminder Time Interval setting enabled.}
	\item{Reminder Time Interval, comprised of ``Days," ``Hours," and ``Minutes" controls, gives the time period between each reminder. It is configurable from 0-4 days, 0-23 hours, and 0-59 minutes; however, if both days and hours are set to zero, minutes has a minimum of 1.}
	\item{Calendar to Publish, which determines the calendar in which to place events; the options given include only the write-accessible calendars listed in the phone's calendar application. There is no ability to create a new calendar from within dotCal.}
\end{itemize}

It is not necessary to invoke this screen to use the application; Remind Me defaults to checked, Reminder Time Interval defaults to one hour, and Calendar to Publish defaults to the user's default calendar given by the phone's calendar application.

In a future version, if the user intends to publish to a blog, relevant information for that needs to be gathered as well. This should be done through separate tabs in the settings screen. 


\subsection{Start Screen}

The Start Screen allows the user to start an event by clicking one of four category buttons. These categories are:

\begin{itemize}
	\item{Work} 
	\item{Play}
	\item{Eat}
	\item{Other}
\end{itemize}

The space above the category buttons should show a summary (category, times, and location) of the last completed event. If this is the user's first event, the space above the category buttons instead shows a welcome message and a link to online documentation.

\subsection{Current Event Screen}

This screen appears when an event is started. It displays the start time of the event, and the chosen category for the event. The screen presents three buttons: one to change the event's category, one to stop the event, and one to cancel the event.

Pressing \bt{Change Category} takes the user to the Change Category Screen. Pressing \bt{Stop Event} takes the user to the Summary Screen. Pressing \bt{Cancel Event} displays the Cancelation Confirmation Popup Screen. If the user chooses to cancel the event, the user will be taken back to the Start Screen and the event will not be recorded.

\subsection{Change Category Screen}

This screen appears only when the user presses \bt{Change Category} in the Current Event Screen. This screen presents four category choices exactly like the Start Screen, but with the message ``Please select the new category for this event" instead of and in place of the ``Last Event'' summary. When the user pushes one of the four category buttons, they are taken back to the Current Event Screen, which will now show the newly selected event category. The event's start time is not changed by this screen; only the event's category may be changed by this screen.

\subsection{Summary Screen}

After the user presses \bt{Stop Event} in the Current Event Screen, the event is finished and the Summary Screen is displayed. It displays the start- and stop times of the event, the event's category, and presents two buttons: one to edit the event and one to save the event as-is and return to the Start Screen.

\subsection{Reminder Notification Screen}

If the Remind Me option is enabled and an event has been running for the amount of time specified in the Reminder Time Interval setting, the Reminder Notification Screen will appear briefly on the screen as a system notification, above whatever application Android is currently running. This notification displays a message like, ``dotCal Reminder: Your `Play' event has been in progress since 2:00pm." The message disappears after a short time and is logged in the system notification list. When the user views the notification in the system notification list, they can click it to activate the application, directly invoking the Current Event Screen. 
\subsection{Cancelation Confirmation Popup Screen}

This popup is triggered by the user pressing either \bt{Cancel Event} or the physical back button when the Current Event Screen is active.

This popup has two buttons: \bt{Cancel Event} allows the user the cancel the event, and returns to the Start Event Screen; \bt{Continue Event} continues the event, as if the user had never performed the action which triggered this popup.

\subsection{Event Life Cycle}

Upon the start of a new event, dotCal gathers and stores specific information: the current time, the event's category, and the phone's current GPS coordinates. While the GPS obtains coordinates, a ``busy'' splash screen appears. If the GPS fails, or takes longer than 7 seconds, the application records the new event's location as ``Unknown."

After an event is started, the application need not be active or running in the phone until the user wishes to stop or cancel the event.

If the Remind Me option is enabled, and an event is left running for the amount of time specified by the Reminder Time Interval, the Reminder Notification Screen will appear.

When an event is ended, the time will be recorded, and information about the event will be transferred to the calendar. Times sent to the calendar will be rounded to the nearest minute. The Summary Screen will appear, giving the user the choice between editing the event or continuing in dotCal.


\subsection{Event Editing}

The user has the option to add tags or a description to an event as it is completed. If possible, this should be as simple as opening the event in Android's calendar. The user can then edit the event through the phone's calendar. If use of calendar is not possible, a screen should still appear, allowing the user to type in a description.

\subsection{Calendar}
The completed event in Android's calendar will have the location in geo-coordinates as well as the event's category, start and end time. (These will be stored in the \emph{Where}, \emph{What}, \emph{From} and \emph{To} fields, respectively.) If notes must be added through the dotCal interface, the \emph{Description} field should hold any notes the user made.

\subsection{Application Wide Information}

If the application takes significant time to load, a splash screen should be implemented.

Upon starting, the application will display either
\begin{itemize}
	\item{the Start Event Screen, if no event was previously left running, or}
	\item{the Current Event Screen, if an event was left running when the application was last exited, or}
	\item{the Reminder Notification Screen, if the application's starting was triggered by the Reminder Time Interval expiring.}
\end{itemize}

Throughout the application, the phone's physical back button will take the user to the previous screen. The Summary Screen is an exception; there, the back button will take the user to the Start Screen.  If the user presses the back button while an event is being recorded, this is equivalent to pressing \bt{Cancel Event}, and the Cancelation Confirmation Popup Screen will display.

From each screen of the application, the Slide-Up Menu is accessible. The Slide-Up Menu slides upward into view on the bottom of the screen when the phone's physical MENU button is pressed, but is not otherwise visible. The Slide-Up Menu contains two buttons:
\begin{itemize}
	\item{\bt{Settings}, which invokes the Setup Screen}
	\item{\bt{About}, which invokes the About Screen}
\end{itemize}

The Slide-Up Menu's \bt{Settings} button is enabled only when the Start Screen is active; on all other screens, it is disabled. The \bt{About} button is enabled during all screens.

\end{document}
